<template>
  <div>
    <BulkOperation :data="{ type }" @success="onSuccess" :url="url"> <slot></slot> </BulkOperation>

    <a-modal v-model:visible="resultModel" title="结果">
      <UploadResult v-bind="result" />
    </a-modal>
  </div>
</template>

<script setup lang="ts">
import { FileItem } from "@arco-design/web-vue";

defineProps<{
  url: string;
  type?: "0" | "1";
}>();
const resultModel = ref();

const result = ref();
const onSuccess = (data: FileItem) => {
  result.value = data.response.data;
  resultModel.value = true;
};
</script>

<style lang="scss" scoped></style>
